package composite;

public abstract class Entry {
    public abstract String getName();//获取名字
    public abstract int getSize();//获取大小
    public Entry add(Entry entry){
        throw new FileTreatMentException();
    }
    public void printList(){
        printList("");
    }
    protected abstract void printList(String prefix);

    @Override
    public String toString() {
        return getName()+"("+getSize()+")";
    }
}
